package clinicapoo.dao;

import clinicapoo.BaseClass;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 * @author fmontezuma
 */
public class BaseDAO extends BaseClass
{
	private static EntityManager em;

	public static EntityManager getEntityManager()
	{
		if (em == null)
		{
			EntityManagerFactory emf = Persistence.createEntityManagerFactory("ClinicaPOOPU");
			em = emf.createEntityManager();
		}
		return em;
	}
}
